﻿@model IEnumerable<eduscrum.ViewModels.ProjectVM>
<div id="content">
    <div id="contentcontainer">
        <fieldset id="projectList">
            <legend>Current Projects</legend>
            @if (Model.Count() == 0)
            {
                @:No Projects
            }
            else
            {
                <table cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td><b>Name</b></td>
                        <td width="75"><b>Start Date</b></td>
                        <td width="75"><b>End Date</b></td>
                        <td width="60"></td>
                    </tr>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @Html.DisplayFor(modelItem => item.Name)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.StartDate)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.EndDate)
                            </td>
                            <td>
                                <a href="@Url.Action("Index", "Board", new { id = item.ProjectID })"><img src="@Url.Content("~/images/board.png")" title="Scrumboard" alt="Scrumboard" class="icon" /></a>
                                <a href="@Url.Action("Edit", new { id = item.ProjectID })"><img src="@Url.Content("~/images/options.png")" title="Edit" alt="Edit" class="icon" /></a>
                                <img onclick="deleteItem('project', '@Url.Action("Delete", new { id = item.ProjectID })')" src="@Url.Content("~/images/delete.png")" title="Delete" alt="Delete" class="icon" />
                            </td>
                        </tr>
                    }
                </table>
            }
        </fieldset>
    </div>
</div>